window.onload = function(){
    var container = document.getElementById("container");
    var canvas = document.createElement("canvas");
    container.appendChild(canvas)
    canvas.height = container.clientHeight;
    canvas.width = container.clientWidth;
    var gl = canvas.getContext("webgl");

    gl.clearColor(.0,.0,.0,1.0);
    gl.clear(gl.COLOR_BUFFER_BIT);

    var VERTEX_SHADER_SOURCE =
    "void main(){\n" + 
    "gl_Position = vec4(0.0,0.0,0.0,1.0);\n" +
    "gl_PointSize = 10.0;\n" +
    "}";

    var FRAGMENT_SHADER_SOURCE = 
    "void main(){\n" + 
    "gl_FragColor = vec4(1.0,1.0,1.0,1.0);\n" +
    "}";

    var vectex_shader_object = gl.createShader(gl.VERTEX_SHADER);
    var fragment_shader_object = gl.createShader(gl.FRAGMENT_SHADER);

    gl.shaderSource(vectex_shader_object, VERTEX_SHADER_SOURCE);
    gl.shaderSource(fragment_shader_object, FRAGMENT_SHADER_SOURCE);

    gl.compileShader(vectex_shader_object);
    gl.compileShader(fragment_shader_object);

    var program = gl.createProgram();

    gl.attachShader(program, vectex_shader_object);
    gl.attachShader(program, fragment_shader_object);

    gl.linkProgram(program);
    gl.useProgram(program);

    gl.drawArrays(gl.POINTS,0,1)
};